package com.dkha.common.modules.vo.control;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @version V1.0
 * @Description: 应用层布控任务VO
 * @Title:
 * @author: huangyugang
 * @date: 2019/12/10 9:14
 * @Copyright: 成都电科慧安
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ControlTask对象", description="布控任务")
public class TaskControlVO  implements Serializable {

    @ApiModelProperty(value = "任务ID")
    private Long idControlTask;
    @ApiModelProperty(value = "布控对象(id 人像库id 或者上传图片id)")
    private String controlObject;

    @ApiModelProperty(value = "任务名称")
    @NotNull
    @Length(min=3,message = "任务名称最小长度不能小于3")
    private String taskName;

    @ApiModelProperty(value = "处置类型-码值 抓捕类1，监控类2，提示类0 默认选择0")
    @NotNull(message = "处置类型不能为空")
    private String disposalType;

    @ApiModelProperty(value = "布控类型-码值 长期布控 0，临时布控 1 默认选择0 ")
    @NotNull(message = "布控类型不能为空")
    private String controlType;

    @ApiModelProperty(value = "布控开始时间")
    @DateTimeFormat(pattern = "yyy-MM-dd HH:mm")
    private Date controlStartTime;

    @ApiModelProperty(value = "布控结束时间")
    @DateTimeFormat(pattern = "yyy-MM-dd HH:mm")
    private Date controlEndTime;

    @ApiModelProperty(value = "布控区域")
   // @NotNull(message = "布控区域不能为空")
    private String controlRegion;

    @ApiModelProperty(value = "布控阈值")
    @NotNull(message = "布控阀值不能为空必须是0-1之间")
    @Max(value = 1,message = "布控阈值 最大值为1")
    @Min(value = 0,message = "布控阈值 最小值为0")
    private Double controlThreshold;

    @ApiModelProperty(value = "布控对象库ID列表")
    @NotNull
    @Size(min = 1)
    private List<String> libIds;

    @ApiModelProperty(value = "布控的摄像头ID列表")
    @NotNull
    @Size(min = 1)
    private List<String> listcamera;

    @ApiModelProperty(value = "备注信息")
    private String remarks;

    @ApiModelProperty(value = "上传图片布控的url")
    private String  imgurl;


}
